package cn.ly.tree;

public class BTree {
	
	private Node root;
	public BTree(){
		root = null;
	}
	
	public void insert(int iData,double dData){
		Node node = new Node();
		node.iData = iData;
		node.dData = dData;
		if(root == null){
			root = node;
		}else{
			Node cur = root;
			Node parent;
			while(true){
				parent = cur;
				if(iData < cur.iData){
					cur = parent.left;
					if(cur == null){
						parent.left = node;
					}
				}else{
					cur = parent.right;
					if(cur == null){
						parent.right = node;
					}
				}
			}
		}
	}
	
	public boolean delete(int key){
		Node cur = root;
		Node parent = root;
		return true;
	}

}
